<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>QScintilla: QsciLexerCustom Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">QScintilla
   &#160;<span id="projectnumber">2.6.1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">QsciLexerCustom Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="QsciLexerCustom" --><!-- doxytag: inherits="QsciLexer" -->
<p><code>#include &lt;qscilexercustom.h&gt;</code></p>

<p>Inherits <a class="el" href="classQsciLexer.html">QsciLexer</a>.</p>

<p><a href="classQsciLexerCustom-members.html">List of all members.</a></p>
<h2><a name="pub-methods"></a>
Public Member Functions</h2>
<ul>
<li><a class="el" href="classQsciLexerCustom.html#a8dbdaca7dffe587e442d09f5b780fab5">QsciLexerCustom</a> (QObject *parent=0)
<li><a class="anchor" id="a3a6b7f17d604db4e06e0d469b55b7602"></a><!-- doxytag: member="QsciLexerCustom::~QsciLexerCustom" ref="a3a6b7f17d604db4e06e0d469b55b7602" args="()" -->
virtual <a class="el" href="classQsciLexerCustom.html#a3a6b7f17d604db4e06e0d469b55b7602">~QsciLexerCustom</a> ()
<li>void <a class="el" href="classQsciLexerCustom.html#aae1debbb0a7be0266725c0ca327b0834">setStyling</a> (int length, int style)
<li>void <a class="el" href="classQsciLexerCustom.html#a5ba7f97b19cfa7bd0b846fc56d94fa3c">setStyling</a> (int length, const <a class="el" href="classQsciStyle.html">QsciStyle</a> &amp;style)
<li>void <a class="el" href="classQsciLexerCustom.html#a19d92643c31c4ec10eab14da7c931b55">startStyling</a> (int pos, int styleBits=0)
<li>virtual void <a class="el" href="classQsciLexerCustom.html#a91d71c4bdff5140ae0b0cb34b4511f79">styleText</a> (int start, int end)=0
<li><a class="anchor" id="a224fe82235b9a1c7b9c8bec9dd441178"></a><!-- doxytag: member="QsciLexerCustom::setEditor" ref="a224fe82235b9a1c7b9c8bec9dd441178" args="(QsciScintilla *editor)" -->
virtual void <a class="el" href="classQsciLexerCustom.html#a224fe82235b9a1c7b9c8bec9dd441178">setEditor</a> (<a class="el" href="classQsciScintilla.html">QsciScintilla</a> *editor)
<li>virtual int <a class="el" href="classQsciLexerCustom.html#a472781cc12e12d742f77f53776cc938e">styleBitsNeeded</a> () const 
</ul>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>The <a class="el" href="classQsciLexerCustom.html" title="The QsciLexerCustom class is an abstract class used as a base for new language lexers.">QsciLexerCustom</a> class is an abstract class used as a base for new language lexers. </p>
<p>The advantage of implementing a new lexer this way (as opposed to adding the lexer to the underlying Scintilla code) is that it does not require the QScintilla library to be re-compiled. It also makes it possible to integrate external lexers.</p>
<p>All that is necessary to implement a new lexer is to define appropriate styles and to re-implement the <a class="el" href="classQsciLexerCustom.html#a91d71c4bdff5140ae0b0cb34b4511f79">styleText()</a> method. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a8dbdaca7dffe587e442d09f5b780fab5"></a><!-- doxytag: member="QsciLexerCustom::QsciLexerCustom" ref="a8dbdaca7dffe587e442d09f5b780fab5" args="(QObject *parent=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QsciLexerCustom::QsciLexerCustom </td>
          <td>(</td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>parent</em> = <code>0</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Construct a <a class="el" href="classQsciLexerCustom.html" title="The QsciLexerCustom class is an abstract class used as a base for new language lexers.">QsciLexerCustom</a> with parent <em>parent</em>. <em>parent</em> is typically the <a class="el" href="classQsciScintilla.html" title="The QsciScintilla class implements a higher level, more Qt-like, API to the Scintilla editor widget...">QsciScintilla</a> instance. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="aae1debbb0a7be0266725c0ca327b0834"></a><!-- doxytag: member="QsciLexerCustom::setStyling" ref="aae1debbb0a7be0266725c0ca327b0834" args="(int length, int style)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QsciLexerCustom::setStyling </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>style</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The next <em>length</em> characters starting from the current styling position have their style set to style number <em>style</em>. The current styling position is moved. The styling position is initially set by calling <a class="el" href="classQsciLexerCustom.html#a19d92643c31c4ec10eab14da7c931b55">startStyling()</a>.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classQsciLexerCustom.html#a19d92643c31c4ec10eab14da7c931b55">startStyling()</a>, <a class="el" href="classQsciLexerCustom.html#a91d71c4bdff5140ae0b0cb34b4511f79">styleText()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a5ba7f97b19cfa7bd0b846fc56d94fa3c"></a><!-- doxytag: member="QsciLexerCustom::setStyling" ref="a5ba7f97b19cfa7bd0b846fc56d94fa3c" args="(int length, const QsciStyle &amp;style)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QsciLexerCustom::setStyling </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classQsciStyle.html">QsciStyle</a> &amp;&#160;</td>
          <td class="paramname"><em>style</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The next <em>length</em> characters starting from the current styling position have their style set to style <em>style</em>. The current styling position is moved. The styling position is initially set by calling <a class="el" href="classQsciLexerCustom.html#a19d92643c31c4ec10eab14da7c931b55">startStyling()</a>.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classQsciLexerCustom.html#a19d92643c31c4ec10eab14da7c931b55">startStyling()</a>, <a class="el" href="classQsciLexerCustom.html#a91d71c4bdff5140ae0b0cb34b4511f79">styleText()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a19d92643c31c4ec10eab14da7c931b55"></a><!-- doxytag: member="QsciLexerCustom::startStyling" ref="a19d92643c31c4ec10eab14da7c931b55" args="(int pos, int styleBits=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QsciLexerCustom::startStyling </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>styleBits</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The styling position is set to <em>start</em> and the mask of style bits that can be set is set to <em>styleBits</em>. <em>styleBits</em> allows the styling of text to be done over several passes by setting different style bits on each pass. If <em>styleBits</em> is 0 then all style bits (as returned by <a class="el" href="classQsciLexerCustom.html#a472781cc12e12d742f77f53776cc938e">styleBitsNeeded()</a>) are set.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classQsciLexerCustom.html#aae1debbb0a7be0266725c0ca327b0834">setStyling()</a>, <a class="el" href="classQsciLexerCustom.html#a472781cc12e12d742f77f53776cc938e">styleBitsNeeded()</a>, <a class="el" href="classQsciLexerCustom.html#a91d71c4bdff5140ae0b0cb34b4511f79">styleText()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a91d71c4bdff5140ae0b0cb34b4511f79"></a><!-- doxytag: member="QsciLexerCustom::styleText" ref="a91d71c4bdff5140ae0b0cb34b4511f79" args="(int start, int end)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void QsciLexerCustom::styleText </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>end</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This is called when the section of text beginning at position <em>start</em> and up to position <em>end</em> needs to be styled. <em>start</em> will always be at the start of a line. The text is styled by calling <a class="el" href="classQsciLexerCustom.html#a19d92643c31c4ec10eab14da7c931b55">startStyling()</a> followed by one or more calls to <a class="el" href="classQsciLexerCustom.html#aae1debbb0a7be0266725c0ca327b0834">setStyling()</a>. It must be re-implemented by a sub-class.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classQsciLexerCustom.html#aae1debbb0a7be0266725c0ca327b0834">setStyling()</a>, <a class="el" href="classQsciLexerCustom.html#a19d92643c31c4ec10eab14da7c931b55">startStyling()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a472781cc12e12d742f77f53776cc938e"></a><!-- doxytag: member="QsciLexerCustom::styleBitsNeeded" ref="a472781cc12e12d742f77f53776cc938e" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int QsciLexerCustom::styleBitsNeeded </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This re-implementation returns 5 as the number of style bits needed. </p>

<p>Reimplemented from <a class="el" href="classQsciLexer.html#add2b17b97fa2acf096933b0b4553b707">QsciLexer</a>.</p>

</div>
</div>
</div>


<hr class="footer"/><address class="footer"><small>
Generated on Fri Feb 10 2012 09:59:54 for QScintilla by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
